import abstract_factory.AbstractFactory;
import abstract_product.Magician;
import abstract_product.Warrior;
import concrete_factory.HumanFactory;
import concrete_factory.OrcFactory;

/**
 * 将职业看作一个产品族，任务看作产品等级结构
 * 客户端也可以自由地组合
 */
public class Test {
    public static void main(String[] args) {
        // 想要选择人类魔法师：
        AbstractFactory factory1 = new HumanFactory();
        Magician magician = factory1.getMagician();
        System.out.println(magician);
        // 想要选择兽人战士：
        AbstractFactory factory2 = new OrcFactory();
        Warrior warrior = factory2.getWarrior();
        System.out.println(warrior);
    }
}
